package edu.hwadee.BEIS.entity;
// default package

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * MajorTrainingBase entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "major_trainingbase", catalog = "beis")

public class MajorTrainingBase implements java.io.Serializable {

	// Fields

	private Integer majorTrainingbaseId;
	private SchoolBasicInfor schoolBasic;
	private String majorTrainingbaseName;
	private Integer majorTrainingroomCount;
	private Integer majorTrainingroomDeviceCount;
	private Integer majorStationCount;
	private Float majorCentralFund;
	private Float majorProvinceFund;
	private Float majorCityFund;
	private Float majorCountryFund;
	private Float majorSelfFund;
	private Float majorCompanyDonationFund;
	private Integer globalCooperationTrainingStudentCount;
	private Integer trainingSocializationCount;
	private String major;
	private Short countyAuditStatus;
	private Short cityAuditStatus;
	private Timestamp modifyTime;
	private Set<TrainingRoom> trainingRooms = new HashSet<TrainingRoom>(0);

	// Constructors

	/** default constructor */
	public MajorTrainingBase() {
	}

	/** minimal constructor */
	public MajorTrainingBase(SchoolBasicInfor schoolBasic, String majorTrainingbaseName,
			Integer majorTrainingroomCount, Integer majorTrainingroomDeviceCount, Integer majorStationCount,
			Float majorCentralFund, Float majorProvinceFund, Float majorCityFund, Float majorCountryFund,
			Float majorSelfFund, Float majorCompanyDonationFund, Integer globalCooperationTrainingStudentCount,
			Integer trainingSocializationCount, String major, Short countyAuditStatus, Short cityAuditStatus,
			Timestamp modifyTime) {
		this.schoolBasic = schoolBasic;
		this.majorTrainingbaseName = majorTrainingbaseName;
		this.majorTrainingroomCount = majorTrainingroomCount;
		this.majorTrainingroomDeviceCount = majorTrainingroomDeviceCount;
		this.majorStationCount = majorStationCount;
		this.majorCentralFund = majorCentralFund;
		this.majorProvinceFund = majorProvinceFund;
		this.majorCityFund = majorCityFund;
		this.majorCountryFund = majorCountryFund;
		this.majorSelfFund = majorSelfFund;
		this.majorCompanyDonationFund = majorCompanyDonationFund;
		this.globalCooperationTrainingStudentCount = globalCooperationTrainingStudentCount;
		this.trainingSocializationCount = trainingSocializationCount;
		this.major = major;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
	}

	/** full constructor */
	public MajorTrainingBase(SchoolBasicInfor schoolBasic, String majorTrainingbaseName,
			Integer majorTrainingroomCount, Integer majorTrainingroomDeviceCount, Integer majorStationCount,
			Float majorCentralFund, Float majorProvinceFund, Float majorCityFund, Float majorCountryFund,
			Float majorSelfFund, Float majorCompanyDonationFund, Integer globalCooperationTrainingStudentCount,
			Integer trainingSocializationCount, String major, Short countyAuditStatus, Short cityAuditStatus,
			Timestamp modifyTime, Set<TrainingRoom> trainingRooms) {
		this.schoolBasic = schoolBasic;
		this.majorTrainingbaseName = majorTrainingbaseName;
		this.majorTrainingroomCount = majorTrainingroomCount;
		this.majorTrainingroomDeviceCount = majorTrainingroomDeviceCount;
		this.majorStationCount = majorStationCount;
		this.majorCentralFund = majorCentralFund;
		this.majorProvinceFund = majorProvinceFund;
		this.majorCityFund = majorCityFund;
		this.majorCountryFund = majorCountryFund;
		this.majorSelfFund = majorSelfFund;
		this.majorCompanyDonationFund = majorCompanyDonationFund;
		this.globalCooperationTrainingStudentCount = globalCooperationTrainingStudentCount;
		this.trainingSocializationCount = trainingSocializationCount;
		this.major = major;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
		this.trainingRooms = trainingRooms;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "major_trainingbase_id", unique = true, nullable = false)

	public Integer getMajorTrainingbaseId() {
		return this.majorTrainingbaseId;
	}

	public void setMajorTrainingbaseId(Integer majorTrainingbaseId) {
		this.majorTrainingbaseId = majorTrainingbaseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "school_id", nullable = false)

	public SchoolBasicInfor getSchoolBasic() {
		return this.schoolBasic;
	}

	public void setSchoolBasic(SchoolBasicInfor schoolBasic) {
		this.schoolBasic = schoolBasic;
	}

	@Column(name = "major_trainingbase_name", nullable = false, length = 50)

	public String getMajorTrainingbaseName() {
		return this.majorTrainingbaseName;
	}

	public void setMajorTrainingbaseName(String majorTrainingbaseName) {
		this.majorTrainingbaseName = majorTrainingbaseName;
	}

	@Column(name = "major_trainingroom_count", nullable = false)

	public Integer getMajorTrainingroomCount() {
		return this.majorTrainingroomCount;
	}

	public void setMajorTrainingroomCount(Integer majorTrainingroomCount) {
		this.majorTrainingroomCount = majorTrainingroomCount;
	}

	@Column(name = "major_trainingroom_device_count", nullable = false)

	public Integer getMajorTrainingroomDeviceCount() {
		return this.majorTrainingroomDeviceCount;
	}

	public void setMajorTrainingroomDeviceCount(Integer majorTrainingroomDeviceCount) {
		this.majorTrainingroomDeviceCount = majorTrainingroomDeviceCount;
	}

	@Column(name = "major_station_count", nullable = false)

	public Integer getMajorStationCount() {
		return this.majorStationCount;
	}

	public void setMajorStationCount(Integer majorStationCount) {
		this.majorStationCount = majorStationCount;
	}

	@Column(name = "major_central_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorCentralFund() {
		return this.majorCentralFund;
	}

	public void setMajorCentralFund(Float majorCentralFund) {
		this.majorCentralFund = majorCentralFund;
	}

	@Column(name = "major_province_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorProvinceFund() {
		return this.majorProvinceFund;
	}

	public void setMajorProvinceFund(Float majorProvinceFund) {
		this.majorProvinceFund = majorProvinceFund;
	}

	@Column(name = "major_city_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorCityFund() {
		return this.majorCityFund;
	}

	public void setMajorCityFund(Float majorCityFund) {
		this.majorCityFund = majorCityFund;
	}

	@Column(name = "major_country_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorCountryFund() {
		return this.majorCountryFund;
	}

	public void setMajorCountryFund(Float majorCountryFund) {
		this.majorCountryFund = majorCountryFund;
	}

	@Column(name = "major_self_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorSelfFund() {
		return this.majorSelfFund;
	}

	public void setMajorSelfFund(Float majorSelfFund) {
		this.majorSelfFund = majorSelfFund;
	}

	@Column(name = "major_company_donation_fund", nullable = false, precision = 12, scale = 0)

	public Float getMajorCompanyDonationFund() {
		return this.majorCompanyDonationFund;
	}

	public void setMajorCompanyDonationFund(Float majorCompanyDonationFund) {
		this.majorCompanyDonationFund = majorCompanyDonationFund;
	}

	@Column(name = "global_cooperation_training_student_count", nullable = false)

	public Integer getGlobalCooperationTrainingStudentCount() {
		return this.globalCooperationTrainingStudentCount;
	}

	public void setGlobalCooperationTrainingStudentCount(Integer globalCooperationTrainingStudentCount) {
		this.globalCooperationTrainingStudentCount = globalCooperationTrainingStudentCount;
	}

	@Column(name = "training_socialization_count", nullable = false)

	public Integer getTrainingSocializationCount() {
		return this.trainingSocializationCount;
	}

	public void setTrainingSocializationCount(Integer trainingSocializationCount) {
		this.trainingSocializationCount = trainingSocializationCount;
	}

	@Column(name = "major", nullable = false, length = 50)

	public String getMajor() {
		return this.major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	@Column(name = "county_auditstatus", nullable = false)

	public Short getCountyAuditStatus() {
		return this.countyAuditStatus;
	}

	public void setCountyAuditStatus(Short countyAuditStatus) {
		this.countyAuditStatus = countyAuditStatus;
	}

	@Column(name = "city_auditstatus", nullable = false)

	public Short getCityAuditStatus() {
		return this.cityAuditStatus;
	}

	public void setCityAuditStatus(Short cityAuditStatus) {
		this.cityAuditStatus = cityAuditStatus;
	}

	@Column(name = "modify_time", nullable = false, length = 19)

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "majorTrainingBase")

	public Set<TrainingRoom> getTrainingRooms() {
		return this.trainingRooms;
	}

	public void setTrainingRooms(Set<TrainingRoom> trainingRooms) {
		this.trainingRooms = trainingRooms;
	}

}